from django.db import models

# Create your models here.


class Music(models.Model):
    id = models.AutoField(primary_key=True)
    name = models.CharField(max_length=32)


class Singer(models.Model):
    id = models.AutoField(primary_key=True)
    name = models.CharField(max_length=64, unique=True)


class Special(models.Model):
    id = models.AutoField(primary_key=True)
    name = models.CharField(max_length=128, unique=True)


class Company(models.Model):
    id = models.AutoField(primary_key=True)
    name = models.CharField(max_length=128, unique=True)


class Release(models.Model):
    musicId = models.IntegerField()
    singerId = models.IntegerField()
    specialId = models.IntegerField()
    companyId = models.IntegerField()
    lrc = models.CharField(max_length=128)

    class Meta:
        unique_together = ("musicId", "singerId", "specialId")
